﻿<%@ Page Language="C#" MasterPageFile="~/View/Admin/Template.master" AutoEventWireup="true" CodeFile="QuanLyLoaiTT.aspx.cs" Inherits="View_Admin_QuanLyLoaiTT" Title="Quản lí tin tức" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style2
        {
            width: 228px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table align="center" class="style1">
        <tr>
            <td align="right" class="style2">
                Tên loại :</td>
            <td align="left">
                <asp:TextBox ID="txtTen" runat="server" Width="183px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtTen" ErrorMessage="Không đươc bỏ trống" 
                    ValidationGroup="a"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right" class="style2">
                <asp:Label ID="lblThongBao" runat="server" Font-Italic="True" ForeColor="Red"></asp:Label>
            </td>
            <td align="left">
                <asp:Button ID="btnThem" runat="server" onclick="btnThem_Click" Text="Thêm" 
                    ValidationGroup="a" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    Width="228px" onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                    onrowupdating="GridView1_RowUpdating">
                    <Columns>
                        <asp:BoundField DataField="maloai" HeaderText="Mã Loại" />
                        <asp:BoundField DataField="tenloai" HeaderText="Tên Loại" />
                        <asp:CommandField CancelText="Hủy Bỏ" EditText="Sửa" ShowEditButton="True" 
                            UpdateText=" Cập Nhật" />
                        <asp:CommandField CancelText="Hủy Bỏ" DeleteText="Xóa" EditText="Sửa" 
                            ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>

